import request from '@/utils/request';
import bodyParse from '@/utils/bodyParse';

//创建续单
export async function renewalorder(params) {
    return request('/cujin/renewal_order', {
        method: 'POST',
        data: params,
    });
}

//提交审核
export async function renewalsubmit(params) {
    return request('/cujin/renewal_order/dispatch_submit', {
        method: 'PUT',
        data: params,
    });
}

//重试
export async function renewalretry(params) {
    return request('/cujin/renewal_order/dispatch_retry', {
        method: 'PUT',
        data: params,
    });
}

//重试
export async function renewalcancel(params) {
    return request('/cujin/renewal_order/cancel', {
        method: 'PUT',
        data: params,
    });
}


//业务列表
export async function company(params) {
    return request('/cujin/company' + bodyParse(params));
}
export async function companydetail(params) {
    return request('/cujin/company/' + params.id);
}

//业务列表
export async function paymentorder(params) {
    return request('/cujin/payment_order/' + params);
}

//创建业务
export async function addother_business(params) {
    return request('/cujin/other_business', {
        method: 'POST',
        data: params,
    });
}
//删除业务
export async function deleteother_business(params) {
    return request('/cujin/other_business/' + params, {
        method: 'DELETE',
    });
}


//创建业务
export async function addcompany(params) {
    return request('/cujin/company', {
        method: 'POST',
        data: params,
    });
}

//更新业务
export async function editcompany(params) {
    return request('/cujin/company/' + params.id, {
        method: 'PUT',
        data: params,
    });
}



//删除业务
export async function deletecompany(params) {
    return request('/cujin/company/' + params, {
        method: 'DELETE',
    });
}


//创建收款单
export async function addpaymentorder(params) {
    return request('/cujin/payment_order', {
        method: 'POST',
        data: params,
    });
}
//调度拒绝
export async function paymentordercash(params) {
    return request('/cujin/payment_order/' + params.id, {
        method: 'PUT',
        data: params,
    });
}

//删除收款单
export async function deletepaymentorder(params) {
    return request('/cujin/payment_order/' + params, {
        method: 'DELETE',
    });
}

//调度拒绝
export async function renewalrefuse(params) {
    return request('/cujin/renewal_order/account_refuse', {
        method: 'PUT',
        data: params,
    });
}


//调度拒绝
export async function dispatchrefuse(params) {
    return request('/cujin/company/dispatch_refuse', {
        method: 'PUT',
        data: params,
    });
}

//调度拒绝
export async function accountrefuse(params) {
    return request('/cujin/company/account_refuse', {
        method: 'PUT',
        data: params,
    });
}
//调度拒绝
export async function cashierrefuse(params) {
    return request('/cujin/payment_order/cashier_refuse', {
        method: 'PUT',
        data: params,
    });
}
//调度拒绝
export async function accountrefuses(params) {
    return request('/cujin/payment_order/account_refuse', {
        method: 'PUT',
        data: params,
    });
}


//更新业务
export async function dispatchretry(params) {
    return request('/cujin/company/dispatch_retry', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function accountretry(params) {
    return request('/cujin/company/account_retry', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function cashierretry(params) {
    return request('/cujin/payment_order/cashier_retry', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function accountretrys(params) {
    return request('/cujin/payment_order/account_retry', {
        method: 'PUT',
        data: params,
    });
}



//更新业务
export async function dispatchsubmit(params) {
    return request('/cujin/company/dispatch_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新业务
export async function renewalsubmits(params) {
    return request('/cujin/renewal_order/account_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新业务
export async function accountcache(params) {
    return request('/cujin/company/account_cache', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function accountsubmit(params) {
    return request('/cujin/company/account_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新业务
export async function accountsubmits(params) {
    return request('/cujin/payment_order/account_submit', {
        method: 'PUT',
        data: params,
    });
}
//更新业务
export async function cashiersubmit(params) {
    return request('/cujin/payment_order/cashier_submit', {
        method: 'PUT',
        data: params,
    });
}



//活动列表
export async function activity(params) {
    return request('/cujin/activity' + bodyParse(params));
}

//活动列表
export async function setting() {
    return request('/cujin/setting');
}

//更新活动
export async function editsetting(params) {
    return request('/cujin/setting/' + params.id, {
        method: 'PUT',
        data: params,
    });
}



//创建活动
export async function addactivity(params) {
    return request('/cujin/activity', {
        method: 'POST',
        data: params,
    });
}


//创建活动
export async function payment_take(params) {
    return request('/cujin/payment_take', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editpayment_take(params) {
    return request('/cujin/payment_take/' + params.id, {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function transfer_account(params) {
    return request('/cujin/other_business/transfer_account', {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function receiver_submit(params) {
    return request('/cujin/other_business/receiver_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function coordination_submit(params) {
    return request('/cujin/other_business/coordination_submit', {
        method: 'PUT',
        data: params,
    });
}

//更新活动
export async function auxiliary_coordination_submit(params) {
    return request('/cujin/other_business/auxiliary_coordination_submit', {
        method: 'PUT',
        data: params,
    });
}

//业务列表
export async function otherbusinesstake(params) {
    return request('/cujin/other_business_take' + bodyParse(params));
}



//删除活动
export async function deletepayment_take(params) {
    return request('/cujin/payment_take/' + params, {
        method: 'DELETE',
    });
}

//创建其他业务提成设置
export async function other_business_take(params) {
    return request('/cujin/other_business_take', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editother_business_take(params) {
    return request('/cujin/other_business_take/' + params.id, {
        method: 'PUT',
        data: params,
    });
}

//登账
export async function set_register(params) {
    return request('/cujin/payment_order/set_register', {
        method: 'PUT',
        data: params,
    });
}

//删除活动
export async function deleteother_business_take(params) {
    return request('/cujin/other_business_take/' + params, {
        method: 'DELETE',
    });
}
//创建活动
export async function open_account(params) {
    return request('/cujin/open_account', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editopen_account(params) {
    return request('/cujin/open_account/' + params.id, {
        method: 'PUT',
        data: params,
    });
}
//删除活动
export async function deleteopen_account(params) {
    return request('/cujin/open_account/' + params, {
        method: 'DELETE',
    });
}


//创建活动
export async function base_salary(params) {
    return request('/cujin/base_salary', {
        method: 'POST',
        data: params,
    });
}

//更新活动
export async function editbase_salary(params) {
    return request('/cujin/base_salary/' + params.id, {
        method: 'PUT',
        data: params,
    });
}
//删除活动
export async function deletebase_salary(params) {
    return request('/cujin/base_salary/' + params, {
        method: 'DELETE',
    });
}


//更新活动
export async function editactivity(params) {
    return request('/cujin/activity/' + params.id, {
        method: 'PUT',
        data: params,
    });
}


//删除活动
export async function deleteactivity(params) {
    return request('/cujin/activity/' + params, {
        method: 'DELETE',
    });
}



//更新活动
export async function stopsettle(params) {
    return request('/cujin/settle/' + params.id, {
        method: 'PUT',
        data: params,
    });
}
